'use strict';
/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  // 挂载单个中间件
  const auth = app.middleware.auth();
  // const check = app.middleware.check();

  router.get('/', controller.home.index);
  router.post('/login', controller.home.login)
  router.post('/register', controller.home.register)

  router.get('/findAll', auth, controller.home.findAll)
  router.get('/findUrl', auth, controller.home.findUrl)
};
